home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / Biomorph 0.77 / Funcs src / z3 + z2 + z + c.c next >
Encoding:
C/C++ Source or Header  |  1992-09-05  |  509 b   |  24 lines  |  [TEXT/ALFA]

  1. /* z^3 + z^2 + z +c
  2. **
  3. ** another morf code resource.
  4. **
  5. ** brent burton, 9/5/92
  6. **/
  7.  
  8. #include "complex.h"
  9.  
  10. // ------------
  11.  
  12. void main(ImagPt *Zold, ImagPt *C, ImagPt *Znew);
  13.  
  14. void main(ImagPt *Zold, ImagPt *C, ImagPt *Znew)
  15. {
  16.     ImagPt temp1, temp2;
  17.     
  18.     SquareC( Zold, &temp1);            // temp1 = z^2
  19.     MultC(Zold, &temp1, &temp2);        // temp2 = z^3
  20.     AddC( &temp2, &temp1, &temp2);        // temp2 = z^3 + z^2
  21.     AddC( &temp2, Zold, &temp2);        // temp2 = z^3 + z^2 + z
  22.     AddC( &temp2, C, Znew);                // Znew = temp2 + C
  23. } // main()
  24.